package com.remrbs.mapper;

import com.remrbs.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int updateBatch(List<User> list);

    User selectByUsername(String username);

    /**
     * 目的是用户名模糊查询 ,但是到底采不采用看后续分页查询时的用法
     * @param username
     * @return
     */
    List<User> selectByUsernameLike(@Param("username") String username);
}